﻿using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System;

using System.Data.SqlClient;
using System.Web.Services;

using System.Data;
using System.Configuration;
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.IO;
using System.Data.SqlClient;
using System.Drawing;

public partial class admin_print_for_rent : System.Web.UI.Page
{
    string ss;
    protected void Page_Load(object sender, EventArgs e)
    {
         if (Session["email"] == null)
        {
            Response.Redirect("sessiont.aspx");
        }
        ss = Session["p_id"].ToString();
       // Label1.Text = Session["email"].ToString();
        
        if (Page.IsPostBack)
        {
        }
        else
        {
            string str = Session["p_id"].ToString();
            Image1.ImageUrl = "property.ashx?p_id=" + str.ToString();
            SqlConnection conn = null;
            conn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnStr"].ConnectionString);


            conn.Open();
            SqlCommand scmd = new SqlCommand("SELECT * FROM property_rent where c_id='" + Session["p_id"] + "'", conn);

            SqlDataReader dr = scmd.ExecuteReader();
            if (dr.Read())
            {
                lblsteet.Text = dr[10].ToString();
                lblroom.Text = dr[16].ToString();
                lblfloor.Text = dr[17].ToString();
                lblsize.Text = dr[24].ToString();

             //   txtfname1.Text = dr[1].ToString();
                txtclient_fullname1.Text = dr[6].ToString();
                lblprice.Text = dr[21].ToString();
                lblproptype.Text=dr[7].ToString ();
                lblcond.Text = dr[32].ToString();
                lblelevatr.Text = dr[20].ToString();
                lblparking.Text = dr[19].ToString();
                lblagent.Text=dr[5].ToString ();
                lbbalcony.Text = dr[33].ToString();
              
                lblac.Text = dr[18].ToString();
               // lblname.Text=dr[6].ToString ();
               
                lblssn.Text = dr[11].ToString();
                lblcity.Text = dr[10].ToString();
               
                lbltype.Text = "To Rent";
            }


            dr.Close();
        }
    }

    }
